﻿
Partial Class WebForm_AddWorkRecord
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Me.fv.InsertItemTemplate = Me.fv.ItemTemplate
        Me.fv.EditItemTemplate = Me.fv.ItemTemplate
    End Sub

    Protected Sub fv_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles fv.DataBound

    End Sub
End Class

Partial Class WebForm_AddWorkRecord
    ''' <summary>
    ''' 新增模式
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub InitData()
        Me.DataAccessMode = My.DataAccessMode.Insert
        Me.fv.ChangeMode(FormViewMode.Insert)
    End Sub

    Public Property WorkRecordID() As Integer
        Get
            Return ViewState("WorkRecordID")
        End Get
        Set(ByVal value As Integer)
            ViewState("WorkRecordID") = value
        End Set
    End Property

    Private Property DataAccessMode() As My.DataAccessMode
        Get
            Return ViewState("DataAccessMode")
        End Get
        Set(ByVal value As My.DataAccessMode)
            ViewState("DataAccessMode") = value
        End Set
    End Property
End Class